<?php
// 应用公共文件



function returnJson($code, $msg, $data=array()) {
  header('Content-Type:application/json; charset=utf-8');
  exit(json_encode(['code'=>$code, 'msg'=>$msg, 'data'=>$data]));
}

function pageQuery($request){
  $page = isset($request['page'])?$request['page']:1; // 当前页
  $count = isset($request['count'])?$request['count']:10; // 每页条数
  
  return ['page'=>$page, 'count'=>$count];
}

